<!DOCTYPE html>
<html lang="en"xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.thymeleaf.org/thymeleaf-extrals-shiro">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>index</h1>
    <h1 th:text="${msg}"></h1>
<div th:if="${session.loginUser==null}">
    <a th:href="@{/toLogin}">登录</a>
</div>
<div shiro:hasPerssion="user:add">
    <a th:href="@{/user/add}">添加</a>
</div>
   <div shiro:hasPerssion="user:update">
       <a th:href="@{/user/update}">更新</a>
   </div>

    <a th:href="@{/toLogout}">注销</a>
</body>
</html>